package com.realdolmen.whiteyellowcross.memory.datastore;

import java.util.Date;

import com.realdolmen.whiteyellowcross.model.WaitWorkShift;
import com.realdolmen.whiteyellowcross.util.DateTimeHelper;

public class WaitWorkShiftMemory {

    private static WaitWorkShift morningWaitWorkShift = null;
    private static WaitWorkShift afterNoonWaitWorkShift = null;
    private static WaitWorkShift eveningWaitWorkShift = null;

    static{
        loadWaitWorkShifts();
    }

    private static void loadWaitWorkShifts(){
        loadMorningWorkShift();
        loadAfterNoonWorkShift();
        loadEveningWorkShift();
    }

    private static void loadMorningWorkShift(){
        Date fromMorningWorkingShift = DateTimeHelper.constructDateFromTime("08:00","HH:mm");
        Date toMorningWorkingShift = DateTimeHelper.constructDateFromTime("12:00","HH:mm");
        morningWaitWorkShift = new WaitWorkShift("Voormiddag",fromMorningWorkingShift,toMorningWorkingShift,new Long(4));
    }

    private static void loadAfterNoonWorkShift(){
        Date fromAfterNoonWorkingShift = DateTimeHelper.constructDateFromTime("12:00","HH:mm");
        Date toAfterNoonWorkingShift = DateTimeHelper.constructDateFromTime("18:00","HH:mm");
        afterNoonWaitWorkShift = new WaitWorkShift("Namiddag",fromAfterNoonWorkingShift,toAfterNoonWorkingShift,new Long(6));
    }

    private static void loadEveningWorkShift(){
        Date fromEveningWorkingShift = DateTimeHelper.constructDateFromTime("18:00","HH:mm");
        Date toEveningWorkingShift = DateTimeHelper.constructDateFromTime("23:00","HH:mm");
        eveningWaitWorkShift = new WaitWorkShift("Avond",fromEveningWorkingShift,toEveningWorkingShift,new Long(5));
    }

    public static WaitWorkShift getMorningWorkShift(){
        return morningWaitWorkShift;
    }

    public static WaitWorkShift getAfterNoonWorkShift(){
        return afterNoonWaitWorkShift;
    }

    public static WaitWorkShift getEveningWorkShift(){
        return eveningWaitWorkShift;
    }



}
